package com.iot.manage.api.domain.mapping;

import com.iot.manage.api.domain.*;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;

public class _MappingKit {

	public static void mapping(ActiveRecordPlugin arp) {
		// Composite Primary Key order: ancestor,descendant
		arp.addMapping("sys_dict", "id", SysDict.class);
		arp.addMapping("sys_dict_item", "id", SysDictItem.class);
		arp.addMapping("sys_log", "id", SysLog.class);
		arp.addMapping("sys_menu", "id", SysMenu.class);
		arp.addMapping("sys_oauth_client_details", "client_id", SysOauthClientDetails.class);
		arp.addMapping("sys_org", "id", SysOrg.class);
		arp.addMapping("sys_region", "id", SysRegion.class);
		arp.addMapping("sys_role", "id", SysRole.class);
		// Composite Primary Key order: role_id,menu_id
		arp.addMapping("sys_role_menu", "role_id,menu_id", SysRoleMenu.class);
		arp.addMapping("sys_user", "id", SysUser.class);
		// Composite Primary Key order: userId,orgId
		arp.addMapping("sys_user_org", "userId,orgId", SysUserOrg.class);
		// Composite Primary Key order: user_id,role_id
		arp.addMapping("sys_user_role", "user_id,role_id", SysUserRole.class);
		
	}
}
